package com.koron.common.core.business.common.service.impl;

import com.koron.bean.app.AppBean;
import com.koron.common.core.business.common.mapper.SystemCommonMapper;
import com.koron.common.core.business.common.service.SystemCommonService;
import lombok.extern.slf4j.Slf4j;
import org.koron.ebs.mybatis.SessionFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName SystemCommonServiceImpl
 * @description
 * @Author zhouj
 * @Date 2022/3/30 14:04
 */
@Slf4j
@Service
public class SystemCommonServiceImpl implements SystemCommonService {

    @Override
    public AppBean queryAppBeanByMark(String mark) {
        try (SessionFactory factory = new SessionFactory()) {
            SystemCommonMapper mapper = factory.getMapper(SystemCommonMapper.class);
            return mapper.queryAppBeanByMark(mark);
        }

    }

    @Override
    public List<String> queryAccountListByOrgId(String orgId) {
        try (SessionFactory factory = new SessionFactory()) {
            SystemCommonMapper mapper = factory.getMapper(SystemCommonMapper.class);
            return mapper.queryAccountListByOrgId(orgId);
        }

    }
}
